# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=libzdb
pkgver=3.2.3
pkgrel=1
pkgdesc="Zild Database Library"
arch=('loong64' 'x86_64')
url="https://www.tildeslash.com/libzdb/"
license=('GPL')
depends=('postgresql-libs' 'sqlite' 'mariadb-libs')
source=(https://www.tildeslash.com/libzdb/dist/libzdb-$pkgver.tar.gz)
sha256sums=('a1957826fab7725484fc5b74780a6a7d0d8b7f5e2e54d26e106b399e0a86beb0')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"
  sed -i '1,1i#include <cassert>' test/zdbpp.cpp
}

build() {
  cd "$srcdir/$pkgname-$pkgver"
  ./configure --prefix=/usr
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir/" install
}
